<?php global $data; ?>
<?php get_header(); ?>

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

<!-- BEGIN #main-content -->
<div id="main-content">

    <h1 class="page-title">
        <?php the_title(); ?>
    </h1>

    <?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?>

    <!-- BEGIN .page-content -->
    <div <?php post_class("page-content"); ?>>

        <div class="profile">

            <?php if( has_post_thumbnail() ) { ?>
                <div class="post-image">
                    <?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'image-style1' ); ?>
                    <?php echo '<img src="' . $src[0] . '" alt="" />'; ?>
                </div>
            <?php } else { ?>
                <div class="no-image"></div>
            <?php }?>

            <div class="post-meta">
                <span>Nombre: <?php the_title(); ?></span>
                <span>Especialidad: <?php the_field( 'especialidad' ); ?></span>
                <span>Local: <?php the_field( 'local' ); ?></span>
            </div>
            
            <div class="share-button">
                <?php 
                    $enc_url = urlencode(get_permalink());
                ?>
                <iframe src="//www.facebook.com/plugins/like.php?href=<?php echo $enc_url; ?>&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;share=false&amp;height=21&amp;appId=248825671837586" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowTransparency="true"></iframe>
            </div>

        </div>
        
        <div class="text">
            <?php the_content(); ?>
        </div>
        
    <!-- END .page-content -->
    </div>

<!-- END #main-content -->
</div>
        
<?php endwhile; endif; ?>

<?php get_footer(); ?>